<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateOptionsTable extends Migration {

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up() {
        Schema::create('options', function(Blueprint $table) {
                $table->increments('id');
                $table->string('type');
                $table->string('status')->default('PUBLISHED');
                $table->string('key');
                $table->text('data');
                $table->char('updater', 5);
                $table->timestamps();
                $table->unique(array ( 'type', 'key' ));
            });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down() {
        Schema::drop('options');
    }

}
